package com.woniu.custom.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName zy_user
 */
@TableName(value ="zy_user")
@Data
public class ZyUser implements Serializable {
    /**
     * 用户id
     */
    @TableId
    private String id;

    /**
     * 用户账号
     */
    private String userAccount;

    /**
     * 用户密码
     */
    private String userPwd;

    /**
     * 用户昵称
     */
    private String userName;

    /**
     * 用户身份证号
     */
    private String userCard;

    /**
     * 用户手机号码
     */
    private String userPhone;

    /**
     * 用户账户余额
     */
    private String userPurse;

    /**
     * 用户头像
     */
    private String userImg;

    /**
     * 用户总消费金额
     */
    private BigDecimal userConsumeAmount;

    /**
     * 用户当前的套餐id
     */
    private String userPackageId;

    /**
     * 用户办理套餐时间
     */
    private Date userPackageCreateTime;

    /**
     * 用户状态（1.正常 2.欠费 3.注销
     */
    private Integer userState;

    /**
     * 用户创建时间
     */
    private Date userCreateTime;

    /**
     * 用户创建经手人
     */
    private String userCreateBy;

    /**
     * 用户修改时间
     */
    private Date userUpdateTime;

    /**
     * 用户修改经手人
     */
    private String userUpdateBy;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ZyUser other = (ZyUser) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserAccount() == null ? other.getUserAccount() == null : this.getUserAccount().equals(other.getUserAccount()))
            && (this.getUserPwd() == null ? other.getUserPwd() == null : this.getUserPwd().equals(other.getUserPwd()))
            && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
            && (this.getUserCard() == null ? other.getUserCard() == null : this.getUserCard().equals(other.getUserCard()))
            && (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone()))
            && (this.getUserPurse() == null ? other.getUserPurse() == null : this.getUserPurse().equals(other.getUserPurse()))
            && (this.getUserImg() == null ? other.getUserImg() == null : this.getUserImg().equals(other.getUserImg()))
            && (this.getUserConsumeAmount() == null ? other.getUserConsumeAmount() == null : this.getUserConsumeAmount().equals(other.getUserConsumeAmount()))
            && (this.getUserPackageId() == null ? other.getUserPackageId() == null : this.getUserPackageId().equals(other.getUserPackageId()))
            && (this.getUserPackageCreateTime() == null ? other.getUserPackageCreateTime() == null : this.getUserPackageCreateTime().equals(other.getUserPackageCreateTime()))
            && (this.getUserState() == null ? other.getUserState() == null : this.getUserState().equals(other.getUserState()))
            && (this.getUserCreateTime() == null ? other.getUserCreateTime() == null : this.getUserCreateTime().equals(other.getUserCreateTime()))
            && (this.getUserCreateBy() == null ? other.getUserCreateBy() == null : this.getUserCreateBy().equals(other.getUserCreateBy()))
            && (this.getUserUpdateTime() == null ? other.getUserUpdateTime() == null : this.getUserUpdateTime().equals(other.getUserUpdateTime()))
            && (this.getUserUpdateBy() == null ? other.getUserUpdateBy() == null : this.getUserUpdateBy().equals(other.getUserUpdateBy()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserAccount() == null) ? 0 : getUserAccount().hashCode());
        result = prime * result + ((getUserPwd() == null) ? 0 : getUserPwd().hashCode());
        result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
        result = prime * result + ((getUserCard() == null) ? 0 : getUserCard().hashCode());
        result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode());
        result = prime * result + ((getUserPurse() == null) ? 0 : getUserPurse().hashCode());
        result = prime * result + ((getUserImg() == null) ? 0 : getUserImg().hashCode());
        result = prime * result + ((getUserConsumeAmount() == null) ? 0 : getUserConsumeAmount().hashCode());
        result = prime * result + ((getUserPackageId() == null) ? 0 : getUserPackageId().hashCode());
        result = prime * result + ((getUserPackageCreateTime() == null) ? 0 : getUserPackageCreateTime().hashCode());
        result = prime * result + ((getUserState() == null) ? 0 : getUserState().hashCode());
        result = prime * result + ((getUserCreateTime() == null) ? 0 : getUserCreateTime().hashCode());
        result = prime * result + ((getUserCreateBy() == null) ? 0 : getUserCreateBy().hashCode());
        result = prime * result + ((getUserUpdateTime() == null) ? 0 : getUserUpdateTime().hashCode());
        result = prime * result + ((getUserUpdateBy() == null) ? 0 : getUserUpdateBy().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userAccount=").append(userAccount);
        sb.append(", userPwd=").append(userPwd);
        sb.append(", userName=").append(userName);
        sb.append(", userCard=").append(userCard);
        sb.append(", userPhone=").append(userPhone);
        sb.append(", userPurse=").append(userPurse);
        sb.append(", userImg=").append(userImg);
        sb.append(", userConsumeAmount=").append(userConsumeAmount);
        sb.append(", userPackageId=").append(userPackageId);
        sb.append(", userPackageCreateTime=").append(userPackageCreateTime);
        sb.append(", userState=").append(userState);
        sb.append(", userCreateTime=").append(userCreateTime);
        sb.append(", userCreateBy=").append(userCreateBy);
        sb.append(", userUpdateTime=").append(userUpdateTime);
        sb.append(", userUpdateBy=").append(userUpdateBy);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}